package gameElements;

import java.awt.Rectangle;
import java.util.ArrayList;

public class Room extends Sprite{

	public enum Type
	{
		NORMAL, STAIR, ELEVATOR, START;
	}


	private Type type; //normal, stairs, elevator
	private boolean[] doors; //north, east, south, west
	private int numDoors;
	private ArrayList<Rectangle> obstacles;

	public Room(Type tp){
		doors = new boolean[4];
		numDoors = 0;
		type = tp;
		obstacles = new ArrayList<Rectangle>();
	}
	
	public void loadRoomImages(){
		if(type == Type.START){			
			loadImages("PATH TO START ROOM", 1, 1);
		}
		else if(type == Type.NORMAL){
			loadImages("PATH TO NORMAL ROOM", 1, 1);
		}
		else if(type == Type.ELEVATOR){
			loadImages("PATH TO ELEVATOR", 1, 1);
		}
		else if(type == Type.STAIR){
			loadImages("PATH TO STAIRS ROOM", 1, 1);
		}
		else{ 
			loadImages("PATH TO NORMAL ROOM", 1, 1);
		}
	}	
	

	public void addDoor(int d){
		if(doors[d] == false){
			doors[d] = true;
			numDoors++;
		}
	}

	public void removeDoor(int d){
		if(doors[d] == true){
			doors[d] = false;
			numDoors--;
		}
	}

	public boolean getDoor(int d){
		return doors[d];
	}

	public int getNumDoors(){
		return numDoors;
	}

	public Type getType(){
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}
}
